<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>hook_example</title>
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.js"></script>
</head>
<body>
    <div id="app" v-demo:foo.a.b="message">
    </div>
    <script>
        Vue.directive('demo', {
            bind: function(el, binding, vnode){
                var s = JSON.stringify;
                el.innerHTML = 
                    'name: ' + s(binding.name) + '<br>' +
                    'value: ' + s(binding.value) + '<br>' +
                    'expression: ' + s(binding.expression) + '<br>' +
                    'argument: ' + s(binding.arg) + '<br>' +
                    'modifiers: ' + s(binding.modifiers) + '<br>' +
                    'vnode keys: ' + Object.keys(vnode).join(', ');
            }
        });
        new Vue({
            el: '#app',
            data: {
                message: 'hello'
            }
        });
    </script>
</body>
</html>
